<?php
use \Sy;
use \blog\libs\BHtml;
if (!class_exists('Sy')) {
	exit;
}
?>
<!DOCTYPE html>
<html>
<head>
	<title>标签 - SYBlog</title>
	<?php Sy::view('admin/common/header'); ?>
</head>
<body>
	<?php Sy::view('admin/common/navbar', ['page' => 'content']); ?>
	<div class="page-content">
		<h2 class="title">标签</h2>
		<table class="striped">
			<thead><th>标题</th><th>文章数</th><th class="action">操作</th></thead>
			<tbody id="list"></tbody>
		</table>
		<ul id="page" class="pagination"></ul>
	</div>
	<div id="meta_form" class="modal">
		<div class="modal-content">
			<h4>编辑</h4>
			<input type="hidden" id="mid"/>
			<div class="row">
				<div class="input-field col s12">
					<input id="title" type="text" placeholder="标题"/>
					<label class="active" for="title">标题</label>
				</div>
				<div class="col s12">
					<label>类型</label>
					<select id="type" class="browser-default">
						<option value="1">分类</option>
						<option value="2">普通标签</option>
					</select>
				</div>
			</div>
		</div>
		<div class="modal-footer">
			<a id="meta_submit" class="modal-action modal-close waves-effect btn-flat">保存</a>
			<a class="modal-action modal-close waves-effect btn-flat">取消</a>
		</div>
	</div>
	<script>
	window.sy = {
		"url": {
			"list": "<?=Sy::createUrl('admin/meta', 'json')?>",
			"ajaxEdit": "<?=Sy::createUrl('admin/ajaxMetaEdit', 'json')?>"
		},
		"page": "Meta"
	};
	</script>
	<?php Sy::view('admin/common/footer'); ?>
</body>
</html>